package com.pc.admin.controller;



import com.pc.admin.entity.LoanRegiStraTion;
import com.pc.admin.service.LoanRegiStraTionService;
import com.pc.admin.util.CommonResult;
import com.pc.admin.util.PageResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(tags = "借用登记")
@RestController
@RequestMapping(value = "/Loan")
public class LoanRegiStraTionController {


    @Autowired
    private LoanRegiStraTionService loanRegiStraTionService;




    @PostMapping("/pageList")
    public CommonResult<PageResult> findPage(@RequestParam(value = "page", defaultValue = "1") Long page,
                                             @RequestParam(value = "pageSize", defaultValue = "10") Long pageSize,
                                             @RequestBody LoanRegiStraTion loanRegiStraTion) {
        PageResult<LoanRegiStraTion> pageResult = loanRegiStraTionService.findPage(page, pageSize,loanRegiStraTion);
        return CommonResult.ok(pageResult);
    }
}
